Optimal. Leaf size=97 \[ -\frac {2 i d^2 \text {Li}_2\left (-i e^{i (a+b x)}\right )}{b^3}+\frac {2 i d^2 \text {Li}_2\left (i e^{i (a+b x)}\right )}{b^3}+\frac {4 i d (c+d x) \tan ^{-1}\left (e^{i (a+b x)}\right )}{b^2}+\frac {(c+d x)^2 \sec (a+b x)}{b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 97, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {4409, 4181, 2279, 2391} \[ -\frac {2 i d^2 \text {PolyLog}\left (2,-i e^{i (a+b x)}\right )}{b^3}+\frac {2 i d^2 \text {PolyLog}\left (2,i e^{i (a+b x)}\right )}{b^3}+\frac {4 i d (c+d x) \tan ^{-1}\left (e^{i (a+b x)}\right )}{b^2}+\frac {(c+d x)^2 \sec (a+b x)}{b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2279
Rule 2391
Rule 4181
Rule 4409
Rubi steps
\begin {align*} \int (c+d x)^2 \sec (a+b x) \tan (a+b x) \, dx &=\frac {(c+d x)^2 \sec (a+b x)}{b}-\frac {(2 d) \int (c+d x) \sec (a+b x) \, dx}{b}\\ &=\frac {4 i d (c+d x) \tan ^{-1}\left (e^{i (a+b x)}\right )}{b^2}+\frac {(c+d x)^2 \sec (a+b x)}{b}+\frac {\left (2 d^2\right ) \int \log \left (1-i e^{i (a+b x)}\right ) \, dx}{b^2}-\frac {\left (2 d^2\right ) \int \log \left (1+i e^{i (a+b x)}\right ) \, dx}{b^2}\\ &=\frac {4 i d (c+d x) \tan ^{-1}\left (e^{i (a+b x)}\right )}{b^2}+\frac {(c+d x)^2 \sec (a+b x)}{b}-\frac {\left (2 i d^2\right ) \operatorname {Subst}\left (\int \frac {\log (1-i x)}{x} \, dx,x,e^{i (a+b x)}\right )}{b^3}+\frac {\left (2 i d^2\right ) \operatorname {Subst}\left (\int \frac {\log (1+i x)}{x} \, dx,x,e^{i (a+b x)}\right )}{b^3}\\ &=\frac {4 i d (c+d x) \tan ^{-1}\left (e^{i (a+b x)}\right )}{b^2}-\frac {2 i d^2 \text {Li}_2\left (-i e^{i (a+b x)}\right )}{b^3}+\frac {2 i d^2 \text {Li}_2\left (i e^{i (a+b x)}\right )}{b^3}+\frac {(c+d x)^2 \sec (a+b x)}{b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.66, size = 174, normalized size = 1.79 \[ \frac {b^2 (c+d x)^2 \sec (a+b x)-4 b c d \tanh ^{-1}\left (\cos (a) \tan \left (\frac {b x}{2}\right )+\sin (a)\right )+\frac {2 d^2 \csc (a) \left (i \text {Li}_2\left (-e^{i \left (b x-\tan ^{-1}(\cot (a))\right )}\right )-i \text {Li}_2\left (e^{i \left (b x-\tan ^{-1}(\cot (a))\right )}\right )+\left (b x-\tan ^{-1}(\cot (a))\right ) \left (\log \left (1-e^{i \left (b x-\tan ^{-1}(\cot (a))\right )}\right )-\log \left (1+e^{i \left (b x-\tan ^{-1}(\cot (a))\right )}\right )\right )\right )}{\sqrt {\csc ^2(a)}}-4 d^2 \tan ^{-1}(\cot (a)) \tanh ^{-1}\left (\cos (a) \tan \left (\frac {b x}{2}\right )+\sin (a)\right )}{b^3} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.50, size = 446, normalized size = 4.60 \[ \frac {b^{2} d^{2} x^{2} + 2 \, b^{2} c d x + b^{2} c^{2} + i \, d^{2} \cos \left (b x + a\right ) {\rm Li}_2\left (i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right )\right ) + i \, d^{2} \cos \left (b x + a\right ) {\rm Li}_2\left (i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right ) - i \, d^{2} \cos \left (b x + a\right ) {\rm Li}_2\left (-i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right )\right ) - i \, d^{2} \cos \left (b x + a\right ) {\rm Li}_2\left (-i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right ) - {\left (b c d - a d^{2}\right )} \cos \left (b x + a\right ) \log \left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + i\right ) + {\left (b c d - a d^{2}\right )} \cos \left (b x + a\right ) \log \left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + i\right ) - {\left (b d^{2} x + a d^{2}\right )} \cos \left (b x + a\right ) \log \left (i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right ) + 1\right ) + {\left (b d^{2} x + a d^{2}\right )} \cos \left (b x + a\right ) \log \left (i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right ) + 1\right ) - {\left (b d^{2} x + a d^{2}\right )} \cos \left (b x + a\right ) \log \left (-i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right ) + 1\right ) + {\left (b d^{2} x + a d^{2}\right )} \cos \left (b x + a\right ) \log \left (-i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right ) + 1\right ) - {\left (b c d - a d^{2}\right )} \cos \left (b x + a\right ) \log \left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + i\right ) + {\left (b c d - a d^{2}\right )} \cos \left (b x + a\right ) \log \left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + i\right )}{b^{3} \cos \left (b x + a\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (d x + c\right )}^{2} \sec \left (b x + a\right ) \tan \left (b x + a\right )\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.02, size = 239, normalized size = 2.46 \[ \frac {d^{2} x^{2}}{b \cos \left (b x +a \right )}+\frac {2 d^{2} \ln \left (1+i {\mathrm e}^{i \left (b x +a \right )}\right ) x}{b^{2}}+\frac {2 d^{2} \ln \left (1+i {\mathrm e}^{i \left (b x +a \right )}\right ) a}{b^{3}}-\frac {2 d^{2} \ln \left (1-i {\mathrm e}^{i \left (b x +a \right )}\right ) x}{b^{2}}-\frac {2 d^{2} \ln \left (1-i {\mathrm e}^{i \left (b x +a \right )}\right ) a}{b^{3}}+\frac {2 i d^{2} \dilog \left (1-i {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}}-\frac {2 i d^{2} \dilog \left (1+i {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}}+\frac {2 a \,d^{2} \ln \left (\sec \left (b x +a \right )+\tan \left (b x +a \right )\right )}{b^{3}}+\frac {2 c d x}{b \cos \left (b x +a \right )}-\frac {2 c d \ln \left (\sec \left (b x +a \right )+\tan \left (b x +a \right )\right )}{b^{2}}+\frac {c^{2}}{b \cos \left (b x +a \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {\mathrm {tan}\left (a+b\,x\right )\,{\left (c+d\,x\right )}^2}{\cos \left (a+b\,x\right )} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (c + d x\right )^{2} \tan {\left (a + b x \right )} \sec {\left (a + b x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________